package com.smkj.kaoqin.common.exception;


import com.smkj.kaoqin.common.enumeration.GlobalExceptionEnum;
import lombok.Data;

/**
 * @author
 * @date
 */
@Data
public class GlobalException extends RuntimeException {

    private Integer code;

    private String msg;

    public GlobalException(Integer code, String message) {
        this.code = code;
        this.msg = message;
    }

    public GlobalException(GlobalExceptionEnum exceptionEnum) {
        this.code = exceptionEnum.getCode();
        this.msg = exceptionEnum.getMessage();
    }
}
